package com.chuanyin.mp3player;

import android.content.Context;
import android.os.Bundle;

import com.chuanyin.mp3player.commons.AndroidUtil;
import com.chuanyin.mp3player.process.ButtonProcess;
import com.chuanyin.mp3player.process.LastPlayedProcess;

public class LastPlayedActivity extends BaseActivity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.last_played);
		init(this);
		
	}
	public  void init(Context ctx){
    	LastPlayedProcess lastPlayedProcess= AndroidUtil.getLastPlayedProcess(this);
		if(lastPlayedProcess!= null){
			lastPlayedProcess.loadMainView();
		}else{
			
			AndroidUtil.setLastPlayedProcess(this, new LastPlayedProcess(this));
			lastPlayedProcess = AndroidUtil.getLastPlayedProcess(this);
			lastPlayedProcess.loadMainView();
		}
		setmMainButtonProcess(new ButtonProcess(this));
    	
    }
	
}
